home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 May: Tool Chest / Dev.CD May 97 TC.toast / Sample Code / Snippets / Networking / ADSP Chat / ADSP Chat.r < prev    next >
Encoding:
Text File  |  1994-09-06  |  6.0 KB  |  399 lines  |  [TEXT/MPS ]

  1. #include "Types.r"
  2. #include "SysTypes.r"
  3.  
  4.  
  5. resource 'vers' (1, purgeable) {
  6.     0x00,
  7.     0x00,
  8.     release,
  9.     0x00,
  10.     verUs,
  11.     "1.0",
  12.     "ADSP Chat - Version 1.0"
  13. };
  14.  
  15. type 'SCOT' as 'STR ';
  16. resource 'SCOT' (0, purgeable) {
  17.     "ADSP Chat - Version 1.0"
  18. };
  19.  
  20. resource 'FREF' (128) {
  21.     'APPL',
  22.     0,
  23.     ""
  24. };
  25.  
  26. data 'SCOT' (0) {
  27.     $"2253 616D 706C 6520 4320 4170 706C 6963"            /* "Sample C Applic */
  28.     $"6174 696F 6E20 2D20 5665 7273 696F 6E20"            /* ation - Version  */
  29.     $"322E 30"                                            /* 2.0 */
  30. };
  31.  
  32. resource 'BNDL' (128) {
  33.     'SCOT',
  34.     0,
  35.     {
  36.         'ICN#', {
  37.         0, 128,
  38.         },
  39.         'FREF', {
  40.         0, 128,
  41.         }
  42.     }
  43. };
  44.  
  45. resource 'MENU' (131, "Special", preload) {
  46.     131,
  47.     textMenuProc,
  48.     allEnabled,
  49.     enabled,
  50.     "ADSP",
  51.     {    /* array: 1 elements */
  52.         /* [1] */
  53.         "Initialize ADSP", noIcon, "A", noMark, plain
  54.     }
  55. };
  56.  
  57. resource 'MENU' (128, "Apple", preload) {
  58.     128,
  59.     textMenuProc,
  60.     0x7FFFFFFD,
  61.     enabled,
  62.     apple,
  63.     {    /* array: 2 elements */
  64.         /* [1] */
  65.         "About ADSP Sample…", noIcon, noKey, noMark, plain,
  66.         /* [2] */
  67.         "-", noIcon, noKey, noMark, plain
  68.     }
  69. };
  70.  
  71. resource 'MENU' (129, "File", preload) {
  72.     129,
  73.     textMenuProc,
  74.     allEnabled,
  75.     enabled,
  76.     "File",
  77.     {    /* array: 2 elements */
  78.         /* [1] */
  79.         "Close", noIcon, noKey, noMark, plain,
  80.         /* [2] */
  81.         "Quit", noIcon, "Q", noMark, plain
  82.     }
  83. };
  84.  
  85. resource 'MENU' (130, "Edit", preload) {
  86.     130,
  87.     textMenuProc,
  88.     allEnabled,
  89.     enabled,
  90.     "Edit",
  91.     {    /* array: 6 elements */
  92.         /* [1] */
  93.         "Undo", noIcon, "Z", noMark, plain,
  94.         /* [2] */
  95.         "-", noIcon, noKey, noMark, plain,
  96.         /* [3] */
  97.         "Cut", noIcon, "X", noMark, plain,
  98.         /* [4] */
  99.         "Copy", noIcon, "C", noMark, plain,
  100.         /* [5] */
  101.         "Paste", noIcon, "V", noMark, plain,
  102.         /* [6] */
  103.         "Clear", noIcon, noKey, noMark, plain
  104.     }
  105. };
  106.  
  107. resource 'DLOG' (128) {
  108.     {40, 40, 169, 313},
  109.     documentProc,
  110.     invisible,
  111.     noGoAway,
  112.     0x0,
  113.     128,
  114.     ""
  115. };
  116.  
  117. resource 'DLOG' (130) {
  118.     {40, 40, 224, 276},
  119.     documentProc,
  120.     invisible,
  121.     noGoAway,
  122.     0x0,
  123.     130,
  124.     ""
  125. };
  126.  
  127. resource 'DLOG' (129) {
  128.     {39, 38, 323, 482},
  129.     noGrowDocProc,
  130.     visible,
  131.     noGoAway,
  132.     0x0,
  133.     129,
  134.     ""
  135. };
  136.  
  137. resource 'DITL' (129) {
  138.     {    /* array DITLarray: 21 elements */
  139.         /* [1] */
  140.         {39, 52, 58, 203},
  141.         UserItem {
  142.             disabled
  143.         },
  144.         /* [2] */
  145.         {66, 52, 85, 203},
  146.         UserItem {
  147.             disabled
  148.         },
  149.         /* [3] */
  150.         {118, 52, 137, 203},
  151.         UserItem {
  152.             enabled
  153.         },
  154.         /* [4] */
  155.         {18, 230, 45, 431},
  156.         UserItem {
  157.             enabled
  158.         },
  159.         /* [5] */
  160.         {23, 234, 42, 429},
  161.         StaticText {
  162.             disabled,
  163.             ""
  164.         },
  165.         /* [6] */
  166.         {245, 12, 266, 123},
  167.         Button {
  168.             enabled,
  169.             "Connect"
  170.         },
  171.         /* [7] */
  172.         {246, 145, 267, 209},
  173.         Button {
  174.             enabled,
  175.             "Quit"
  176.         },
  177.         /* [8] */
  178.         {63, 230, 145, 429},
  179.         UserItem {
  180.             enabled
  181.         },
  182.         /* [9] */
  183.         {72, 234, 144, 426},
  184.         StaticText {
  185.             enabled,
  186.             ""
  187.         },
  188.         /* [10] */
  189.         {158, 228, 175, 430},
  190.         StaticText {
  191.             disabled,
  192.             "Outgoing Text:"
  193.         },
  194.         /* [11] */
  195.         {180, 231, 251, 428},
  196.         EditText {
  197.             enabled,
  198.             ""
  199.         },
  200.         /* [12] */
  201.         {160, 12, 176, 108},
  202.         StaticText {
  203.             disabled,
  204.             "Connected To:"
  205.         },
  206.         /* [13] */
  207.         {94, 24, 111, 190},
  208.         CheckBox {
  209.             enabled,
  210.             "Filter on \"Moof\" types"
  211.         },
  212.         /* [14] */
  213.         {18, 11, 147, 211},
  214.         UserItem {
  215.             disabled
  216.         },
  217.         /* [15] */
  218.         {255, 253, 269, 434},
  219.         StaticText {
  220.             disabled,
  221.             "(Press <enter> to send message)"
  222.         },
  223.         /* [16] */
  224.         {160, 79, 177, 211},
  225.         StaticText {
  226.             disabled,
  227.             ""
  228.         },
  229.         /* [17] */
  230.         {39, 15, 55, 51},
  231.         StaticText {
  232.             disabled,
  233.             "Object"
  234.         },
  235.         /* [18] */
  236.         {66, 15, 82, 51},
  237.         StaticText {
  238.             disabled,
  239.             "Type"
  240.         },
  241.         /* [19] */
  242.         {119, 16, 134, 48},
  243.         StaticText {
  244.             disabled,
  245.             "Zone"
  246.         },
  247.         /* [20] */
  248.         {190, 13, 222, 211},
  249.         UserItem {
  250.             disabled
  251.         },
  252.         /* [21] */
  253.         {197, 18, 218, 207},
  254.         StaticText {
  255.             disabled,
  256.             ""
  257.         }
  258.     }
  259. };
  260.  
  261. resource 'DITL' (128) {
  262.     {    /* array DITLarray: 5 elements */
  263.         /* [1] */
  264.         {88, 180, 108, 260},
  265.         Button {
  266.             enabled,
  267.             "OK"
  268.         },
  269.         /* [2] */
  270.         {8, 8, 24, 214},
  271.         StaticText {
  272.             disabled,
  273.             "ADSP Sample"
  274.         },
  275.         /* [3] */
  276.         {32, 8, 48, 237},
  277.         StaticText {
  278.             disabled,
  279.             "Copyright © 1992 Apple Computer"
  280.         },
  281.         /* [4] */
  282.         {56, 8, 72, 136},
  283.         StaticText {
  284.             disabled,
  285.             "Brought to you by:"
  286.         },
  287.         /* [5] */
  288.         {80, 24, 112, 167},
  289.         StaticText {
  290.             disabled,
  291.             "Macintosh Developer  Technical Support"
  292.         }
  293.     }
  294. };
  295.  
  296. resource 'DITL' (130) {
  297.     {    /* array DITLarray: 2 elements */
  298.         /* [1] */
  299.         {123, 131, 143, 189},
  300.         Button {
  301.             enabled,
  302.             "OK"
  303.         },
  304.         /* [2] */
  305.         {36, 23, 108, 193},
  306.         StaticText {
  307.             disabled,
  308.             "^0"
  309.         }
  310.     }
  311. };
  312.  
  313. resource 'ALRT' (128) {
  314.     {38, 75, 158, 347},
  315.     128,
  316.     {    /* array: 4 elements */
  317.         /* [1] */
  318.         OK, visible, silent,
  319.         /* [2] */
  320.         OK, visible, silent,
  321.         /* [3] */
  322.         OK, visible, silent,
  323.         /* [4] */
  324.         OK, visible, silent
  325.     }
  326. };
  327.  
  328. resource 'ALRT' (130) {
  329.     {40, 40, 240, 280},
  330.     130,
  331.     {    /* array: 4 elements */
  332.         /* [1] */
  333.         OK, visible, sound1,
  334.         /* [2] */
  335.         OK, visible, sound1,
  336.         /* [3] */
  337.         OK, visible, sound1,
  338.         /* [4] */
  339.         OK, visible, sound1
  340.     }
  341. };
  342.  
  343. resource 'SIZE' (-1) {
  344.     reserved,
  345.     acceptSuspendResumeEvents,
  346.     reserved,
  347.     canBackground,
  348.     multiFinderAware,
  349.     backgroundAndForeground,
  350.     dontGetFrontClicks,
  351.     ignoreChildDiedEvents,
  352.     not32BitCompatible,
  353.     notHighLevelEventAware,
  354.     onlyLocalHLEvents,
  355.     notStationeryAware,
  356.     dontUseTextEditServices,
  357.     reserved,
  358.     reserved,
  359.     reserved,
  360.     288000,
  361.     288000
  362. };
  363.  
  364. resource 'MBAR' (128) {
  365.     {    /* array MenuArray: 3 elements */
  366.         /* [1] */
  367.         128,
  368.         /* [2] */
  369.         129,
  370.         /* [3] */
  371.         130
  372.     }
  373. };
  374.  
  375.  
  376. resource 'ICN#' (128) {
  377.     {    /* array: 2 elements */
  378.         /* [1] */
  379.         $"0000 0000 0000 0000 0000 00FC 0000 0084"
  380.         $"0001 0084 0002 80FC 0004 4084 0002 2084"
  381.         $"0001 1000 6FFF 88F0 0000 0488 1BC0 0284"
  382.         $"0000 0484 06FF 8888 0001 10F0 0002 2000"
  383.         $"0104 40FC 0282 8080 0441 0080 0880 00FC"
  384.         $"1100 0004 23FF EC04 4000 00FC 8007 B000"
  385.         $"4000 00FC 23FE C084 1100 00FC 0880 0080"
  386.         $"0440 0080 0280 0080 01",
  387.         /* [2] */
  388.         $"0000 0000 0000 0000 0000 00FC 0000 0084"
  389.         $"0001 0084 0003 80FC 0007 C084 0003 E084"
  390.         $"0001 F000 7FFF F8F0 3FFF FC88 1FFF FE84"
  391.         $"0FFF FC84 07FF F888 0001 F0F0 0003 E000"
  392.         $"0107 C0FC 0383 8080 07C1 0080 0F80 00FC"
  393.         $"1F00 0004 3FFF FE04 7FFF FCFC FFFF F800"
  394.         $"7FFF F0FC 3FFF E084 1F00 00FC 0F80 0080"
  395.         $"07C0 0080 0380 0080 01"
  396.     }
  397. };
  398.  
  399.